package com.chatplus.application.domain.entity.pay;

import com.baomidou.mybatisplus.annotation.TableName;
import com.chatplus.application.datasource.id.LogicDeleteEntity;
import com.chatplus.application.enumeration.AppBusinessCodeEnum;
import com.chatplus.application.enumeration.PayChannelEnum;
import com.chatplus.application.enumeration.PayStatusEnum;

import java.time.Instant;
/**
 * <p>Table: t_pay_request - 支付请求记录（账单）</p>
 */
@TableName(value = "t_pay_request", autoResultMap = true)
public class PayRequestEntity extends LogicDeleteEntity {
    /**
     * 应用ID;
     */
    private String appId;
    /**
     * 业务系统的用户ID
     */
    private Long userId;
    /**
     * 业务系统的业务流水号;记录业务系统的交易流水号
     */
    private Long bizId;
    /**
     * 业务系统的业务类型;记录本次支付业务的业务类型，例如下单支付、补款支付、充值等
     */
    private AppBusinessCodeEnum bizCode;
    /**
     * 账单总金额
     */
    private Long totalMoney;
    /**
     * 渠道交易ID;收银台生成的提交给第三方支付渠道的流水号
     */
    private Long payTransactionId;
    /**
     * 第三方交易ID;微信/支付宝生成的支付流水号
     */
    private String tradeTransactionId;
    /**
     * 平台在渠道系统中的交易账号;公司的支付宝、微信的账户
     */
    private String platformChannelAccount;
    /**
     * 支付渠道
     */
    private PayChannelEnum payChannel;
    /**
     * 支付账户信息，例如付款人微信openid、支付宝buyer_id
     */
    private String payerInfo;
    /**
     * 支付状态
     */
    private PayStatusEnum payStatus;
    /**
     * 已支付总金额
     */
    private Long paidMoney;
    /**
     * 已退款总金额
     */
    private Long refundedMoney;
    /**
     * 请求时间
     */
    private Instant requestAt;
    /**
     * 成功时间
     */
    private Instant successAt;
    /**
     * 关闭时间
     */
    private Instant closedAt;
    /**
     * 错误码
     */
    private String errCode;
    /**
     * 错误描述
     */
    private String errCodeDes;


    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }


    public Long getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(Long totalMoney) {
        this.totalMoney = totalMoney;
    }

    public String getTradeTransactionId() {
        return tradeTransactionId;
    }

    public void setTradeTransactionId(String tradeTransactionId) {
        this.tradeTransactionId = tradeTransactionId;
    }

    public String getPlatformChannelAccount() {
        return platformChannelAccount;
    }

    public void setPlatformChannelAccount(String platformChannelAccount) {
        this.platformChannelAccount = platformChannelAccount;
    }

    public String getPayerInfo() {
        return payerInfo;
    }

    public void setPayerInfo(String payerInfo) {
        this.payerInfo = payerInfo;
    }

    public PayStatusEnum getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(PayStatusEnum payStatus) {
        this.payStatus = payStatus;
    }

    public Long getPaidMoney() {
        return paidMoney;
    }

    public void setPaidMoney(Long paidMoney) {
        this.paidMoney = paidMoney;
    }

    public Long getRefundedMoney() {
        return refundedMoney;
    }

    public void setRefundedMoney(Long refundedMoney) {
        this.refundedMoney = refundedMoney;
    }

    public Instant getRequestAt() {
        return requestAt;
    }

    public void setRequestAt(Instant requestAt) {
        this.requestAt = requestAt;
    }

    public Instant getSuccessAt() {
        return successAt;
    }

    public void setSuccessAt(Instant successAt) {
        this.successAt = successAt;
    }

    public Instant getClosedAt() {
        return closedAt;
    }

    public void setClosedAt(Instant closedAt) {
        this.closedAt = closedAt;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public String getErrCodeDes() {
        return errCodeDes;
    }

    public void setErrCodeDes(String errCodeDes) {
        this.errCodeDes = errCodeDes;
    }

    public PayChannelEnum getPayChannel() {
        return payChannel;
    }

    public void setPayChannel(PayChannelEnum payChannel) {
        this.payChannel = payChannel;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getBizId() {
        return bizId;
    }

    public void setBizId(Long bizId) {
        this.bizId = bizId;
    }

    public AppBusinessCodeEnum getBizCode() {
        return bizCode;
    }

    public void setBizCode(AppBusinessCodeEnum bizCode) {
        this.bizCode = bizCode;
    }

    public Long getPayTransactionId() {
        return payTransactionId;
    }

    public void setPayTransactionId(Long payTransactionId) {
        this.payTransactionId = payTransactionId;
    }
}
